<?php

function check_event_not_set()
{
  require_once('pgb/User.php');
  require_once('pgb/Alert.php');
  require_once 'pgb/Event/Alert.php';

  $USERS = User::getCurrentLoggedUsers();  //pobiera liste zalogowanych userow

  $start_time = time();
  $end_time = $start_time + 1;

  foreach ($USERS as $user_id) {
    $evt_id = Event_User::checkEventOnTime($user_id, $start_time, $end_time);  //sprawdza,czy w danej chwili user ma aktywe zadanie

    if ($evt_id < 0) {
      Event_Alert::setAlertNoTask($user_id);
    }
  }
}